<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="row">

	<div class="col-sm-9">
		<h4>Parámetros de configuración</h4>
		<div class="m-top-15">
		
			<ul class="nav nav-tabs">
				<li class="active"><a data-target="#billingTab" data-toggle="tab">Facturación</a></li>
				<li><a data-target="#mailTab" data-toggle="tab">Correo</a></li>
				<li><a data-target="#repoTab" data-toggle="tab">Repositorio</a></li>
			</ul>
	
			<!-- Tab panes -->
			<div class="tab-content">
				<div class="tab-pane active" id="billingTab">
					<div class="m-top-15">
						<form class="form-horizontal" role="form">
							<div class="form-group">
								<label class="col-sm-2 control-label input-sm">Entidad emisora</label>
								<div class="col-sm-4">
									<div class="input-group">
										<input type='text' class="form-control input-sm" ng-model="entity.x" ng-readonly="isReadOnly" typeahead="owner as owner.completeName for owner in owners($viewValue)" />
										<span class="help-block">Este valor define quien aparece como emisor de las facturas generadas por la aplicación</span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label input-sm">IVA</label>
								<div class="col-sm-4">
									<div class="input-group">
										<input type='text' class="form-control input-sm" ng-model="entity.y" ng-readonly="isReadOnly" typeahead="owner as owner.completeName for owner in owners($viewValue)" />
										<span class="help-block">Porcentaje del IVA utilizado para generar las facturas</span>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="tab-pane" id="mailTab">
					<div class="m-top-15">
						<form class="form-horizontal" role="form">
							<div class="form-group">
								<label class="col-sm-2 control-label input-sm">Usuario de correo</label>
								<div class="col-sm-4">
									<div class="input-group">
										<input type='text' class="form-control input-sm" ng-model="entity.x" ng-readonly="isReadOnly" typeahead="owner as owner.completeName for owner in owners($viewValue)" />
										<span class="help-block"></span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label input-sm">Contraseña de correo</label>
								<div class="col-sm-4">
									<div class="input-group">
										<input type='text' class="form-control input-sm" ng-model="entity.y" ng-readonly="isReadOnly" typeahead="owner as owner.completeName for owner in owners($viewValue)" />
										<span class="help-block"></span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label input-sm">Host</label>
								<div class="col-sm-4">
									<div class="input-group">
										<input type='text' class="form-control input-sm" ng-model="mailSettings.hostName" ng-readonly="isReadOnly" typeahead="owner as owner.completeName for owner in owners($viewValue)" />
										<span class="help-block"></span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label input-sm">Nombre</label>
								<div class="col-sm-4">
									<div class="input-group">
										<input type='text' class="form-control input-sm" ng-model="entity.y" ng-readonly="isReadOnly" typeahead="owner as owner.completeName for owner in owners($viewValue)" />
										<span class="help-block">Valor que aparecerá como texto del emisor</span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label input-sm">Uso de SSL</label>
								<div class="col-sm-4">
									<div class="input-group">
										<input type='text' class="form-control input-sm" ng-model="entity.y" ng-readonly="isReadOnly" typeahead="owner as owner.completeName for owner in owners($viewValue)" />
										<span class="help-block">Valor que aparecerá como texto del emisor</span>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="tab-pane" id="repoTab">
					<div class="m-top-15">
						[repositorio]
					</div>
				</div>
			</div>
		
		</div>
	</div>

	<div class="col-sm-3">
		<div class="btn-toolbar" role="toolbar">
			<div class="btn-group">
				<button ng-click="edit()" ng-class='isReadOnly ? "btn btn-sm btn-primary" : "btn btn-sm btn-default"'>Editar</button>
				<button ng-click="reset()" ng-class='isReadOnly ? "btn btn-sm btn-default" : "btn btn-sm btn-primary"'>
					<span class="glyphicon glyphicon-arrow-left"></span>
				</button>
				<button ng-click="update()" ng-class='isReadOnly ? "btn btn-sm btn-default" : "btn btn-sm btn-primary"'>
					<span class="glyphicon glyphicon-save"></span>
				</button>
				<button type="submit" ng-class='isReadOnly ? "btn btn-sm btn-default" : "btn btn-sm btn-primary"'>
					<span class="glyphicon glyphicon-trash"></span>
				</button>
			</div>
		</div>
		<h4>Consultas</h4>
		<ul class="list-unstyled">
			<li><a href="#">Entidades que aplican este modelo</a></li>
			<li><a href="#">Facturas emitidas con este modelo</a></li>
		</ul>
		<!-- popup con el json de debug -->
		<div class="m-top-40">
			<button class="btn btn-default btn-sm" data-toggle="modal" data-target="#debugJson">Ver JSON</button>
			<div class="modal fade" id="debugJson" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<pre>entity = {{entity | json}}</pre>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>